package com.fan.commons.exception;

import com.fan.commons.util.JsonResult;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * @author fan
 * @date 2021/2/22
 */
@ControllerAdvice
public class MyExceptionHandler {

	@ResponseBody
	@ExceptionHandler(RuntimeException.class)
	public JsonResult exceptionHandler() {
		return JsonResult.failure();
	}
}
